package com.zhc.loom.oom;

import java.util.ArrayList;
import java.util.List;

/**
 * 说明：Java堆内存溢出异常测试
 * VM Args: -Xms20M -Xmx20M -Xmn10M -XX:+HeapDumpOnOutOfMemoryError
 * -verbose:gc -Xms20M -Xmx20M -Xmn10M -XX:+PrintGCDetails -XX:SurvivorRatio=8
 * @author jinsicao
 */
public class HeapOOM {

	static class OOMObject {
		
	}
	
	public static void main(String[] args) {
		List<OOMObject> list = new ArrayList<OOMObject>();
		
		while (true) {
			list.add(new OOMObject());
		}
	}
}
